package com.coocaa.ops.admin.base.model;

import com.coocaa.ops.common.core.base.model.BaseErrLogModel;
import lombok.Data;

import java.util.Objects;

/**
 * @author bijiahao
 * @date : 2019/6/14.
 * @description
 *     管理后台错误日志模型类
 *
 */
@Data
public class MgrErrLogModel extends BaseErrLogModel {
    /**
     * 异常编码
     */
    private String code;
    /**
     * 异常信息-前端显示使用
     */
    private String msg;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        MgrErrLogModel that = (MgrErrLogModel) o;
        return code.equals(that.code) && msg.equals(that.msg);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), code, msg);
    }
}
